package com.mpyy.pojo;

import lombok.*;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
* sale_order 实体类
* Wed Feb 23 09:47:17 CST 2022 tangneng
*/ 
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class SaleOrder{

	private String salOrdId;

	private String empId;

	private String depotId;

	private String custId;

	private Date salOrdDate;

	private String salOrdStatus;

	private Double salOrdPaidIn;

	private Integer salOrdNum;

	private String salOrdOriginalNum;

	private String salOrdComment;

	private Double salOrdReceivable;

	private String null2;
	//客户表
	private CustomerInfo customerInfo;
	//客户类型表
	private CustomerType customerType;
	//员工信息表
	private EmployeeInfo employeeInfo;
	//仓库表
	private DepotInfo depotInfo;


	private Integer page;

	private Integer limit;

	public void setPage(Integer page){
		this.page = ( page - 1 ) * this.limit;
	}

	//搜索，开始日期
	private Date currentTimeStart;
	//搜索，结束日期
	private Date currentTimeEnd;

	//搜索，客户名称
	private String custName;

	private Date minSalOrdDate;
	//商品销售订单明细
	private SaleOrderDesc saleOrderDesc;
	//商品表
	private ProductInfo productInfo;

	SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");

	public void setCurrentTimeStart(String currentTimeStart){
		try {
			this.currentTimeStart = simpleDateFormat.parse(currentTimeStart);
		} catch (ParseException e) {
			e.printStackTrace();
		}
	}

	public void setCurrentTimeEnd(String currentTimeEnd){
		try {
			this.currentTimeEnd = simpleDateFormat.parse(currentTimeEnd);
		} catch (ParseException e) {
			e.printStackTrace();
		}
	}


}

